﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using System.Data;
using System.Reflection;
using System.Runtime.Serialization;
using System.Data.Objects;

namespace GTServices.Entities
{
    public class Template : BaseEntity
    {
        [Key]
        public Guid   Id             { get; set; }
        public string Name           { get; set; } 
        public string RawTemplate { get; set; }
        public string Plural         { get; set; }
        public bool   IsSingularOnly { get; set; }
        public bool   IsSingular     { get; set; }

        public Template()
        {
            Id = Guid.NewGuid();
            this.IsSingular = false;
            this.IsSingularOnly = false;
        }

        public override bool Equals(object obj)
        {
            if (!(obj is Template))
            {
                return false;
            }
            return (obj as Template).Id == this.Id;
        }

        public override void Validate()
        {
            
        }
    }
}
